//  QuDanCompleteAgeViewCell.m
//  QuDanOEM
//  Created by mac on 2021/11/15.
#import "QuDanCompleteAgeViewCell.h"
@implementation QuDanCompleteAgeViewCell
- (void)awakeFromNib {
    [super awakeFromNib];
    self.NotlimitedBtn.layer.cornerRadius = 15.0f;
    self.NotlimitedBtn.layer.masksToBounds = YES;
    [self.AgeSlider setThumbImage:[UIImage imageNamed:@"age_slider"] forState:UIControlStateNormal];
}
/// 不限
/// @param sender 不限
- (IBAction)actionNotLimetedBtn:(UIButton *)sender
{
    self.NotlimitedBtn.backgroundColor = QD_RGB(247, 99, 7);
    [self.NotlimitedBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    if (self.QuDanCompleteAgeViewCellBlock) {
        self.QuDanCompleteAgeViewCellBlock(@"不限");
    }
}
/// 滑块
/// @param sender 滑块
- (IBAction)actionSliderValue:(UISlider *)sender
{
    UISlider *slider = (UISlider *)sender;
    NSLog(@"%.0f",slider.value);
    NSString *valueStr = [NSString stringWithFormat:@"%.0f",slider.value];
    NSLog(@"valueStr:%@",valueStr);
    NSString *limitStr = [NSString stringWithFormat:@"18-%@",valueStr];
    self.NotlimitedBtn.backgroundColor = QD_RGB(238, 238, 238);
    [self.NotlimitedBtn setTitleColor:QD_RGB(106, 107, 110) forState:UIControlStateNormal];
    if (self.QuDanCompleteAgeViewCellBlock) {
        self.QuDanCompleteAgeViewCellBlock(limitStr);
    }
}
@end
